package com.rgs.base.database.sql;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class SqlFilterBetweenBO<T> {
    public static <T> SqlFilterBetweenBO<T> of(T start, T end) {
        if (Objects.isNull(start) || Objects.isNull(end)) {
            return null;
        }
        return new SqlFilterBetweenBO<>(start, end);
    }

    private T begin;
    private T end;
}
